package com.huoxingy.statics.repo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by lihu on 2018/1/11.
 */
@Service
public class MemberCountStaticsRepoImpl implements MemberCountStaticsRepo {

    @Autowired
    JdbcTemplate jdbcTemplate;

    @Override
    public List<Map<String, Object>> findByStoreIdAndBizDateBetweenOrderByBizDateAsc(String storeId, String bizDate, String current) {
        String sql = "select * from daily_member_statics where store_id=? and biz_date Between ? and ? order by biz_date asc  ";
        return jdbcTemplate.queryForList(sql, storeId, bizDate, current);
    }
}
